Magnetic sensor devices can, for example, be configured to measure the speed of a magnetic tooth wheel. Such magnetic speed sensors typically include an integrated circuit with a plurality of magnetic sensor elements, such as Hall sensor elements or magneto resistive (XMR) elements, as, for example, giant magneto resistive (GMR) sensor elements or anisotrope magneto resistive (AMR) sensor elements. A permanent magnet provides a bias magnetic field to the sensor elements. As the wheel is rotated, the teeth of the wheel pass in front of the sensor and generate a small field variation, which is detected by the sensor and processed by the integrated circuit. The detected field contains information about the angular position and rotational speed of the wheel. With respect to the fabrication of such magnetic sensor devices there is a steady demand towards reducing or simplifying fabrication steps, in particular reducing pick-and-place steps or mold steps. Another steady demand relates to the size of the magnetic sensor device package and to the variability of the shape of the permanent magnet as it can be desirable to provide the permanent magnet with a specific shape so as to provide the permanent magnetic field with a particular desired field distribution.